#include <QApplication>
#include "deal_http_post_details.h"
#include "run_guard.h"
#include "mainwindow.h"

int main(int argc, char *argv[])
{
    RunGuard guard("eyJ0eXAiOiJqd3QiLCJhbGciOiJIUzI1NiJ0");
    if (!guard.tryToRun())
    {
        return 0;
    }
    QApplication app(argc,argv);
    DealHttpPostDetails::instance().Advertisement();
    app.setQuitOnLastWindowClosed(true);
    // 加载样式
    QFile file(":/resources/style/star.qss");
    if(file.open(QIODevice::ReadOnly))
    {
        QString style = file.readAll();
        app.setStyleSheet(style);
    }
    file.close();
    MainWindow n;
    n.show();
    return app.exec();
}
